
package fr.jade.reflex.api.control;

import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.api.control.BindingController;
import org.objectweb.fractal.api.control.IllegalBindingException;
import org.objectweb.fractal.api.control.IllegalLifeCycleException;
import org.objectweb.fractal.api.control.LifeCycleController;

/**
 * This interface is used to notify a binding update between the meta and the exec level
 * (and vice versa).
 * 
 * @author nono
 * @contact noel.depalma@inrialpes.fr
 */

public interface BindingNotificationController extends BindingController{

  
    /**
     * Binds the client interface whose name is given to a server interface. More
     * precisely, binds the client interface of the component to which this
     * interface belongs, and whose name is equal to the given name, to the given
     * server interface. The given server interface must be in the same address
     * space as the client interface.
     *
     * @param clientItfName the name of a client interface of the component to
     *      which this interface belongs.
     * @param serverItf a server interface.
     * @throws NoSuchInterfaceException if there is no such client interface.
     * @throws IllegalBindingException if the binding cannot be created.
     * @throws IllegalLifeCycleException if this component has a {@link
     *      LifeCycleController} interface, but it is not in an appropriate state
     *      to perform this operation.
     */
    
    void bindFcNotification (String clientItfName, Object serverItf) throws
      NoSuchInterfaceException,
      IllegalBindingException,
      IllegalLifeCycleException;

    /**
    * Unbinds the given client interface. More precisely, unbinds the client
    * interface of the component to which this interface belongs, and whose name
    * is equal to the given name.
    *
    * @param clientItfName the name of a client interface of the component to
    *      which this interface belongs.
    * @throws NoSuchInterfaceException if there is no such client interface.
    * @throws IllegalBindingException if the binding cannot be removed.
    * @throws IllegalLifeCycleException if this component has a {@link
    *      LifeCycleController} interface, but it is not in an appropriate state
    *      to perform this operation.
    */

    void unbindFcNotification (String clientItfName) throws
      NoSuchInterfaceException,
      IllegalBindingException,
      IllegalLifeCycleException;
}
